package test.chain;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import test.chain.beanbyabstract.RuleHandler;

@Component
public class OrderAutoProcessFactory {
	
	@Resource
	private RuleHandler totalPriceRuleHandler;
	@Resource
	private RuleHandler buyerRemarkRuleHandler;
	@Resource
	private RuleHandler productRuleHandler;
	
	public RuleHandler createAuditRuleHandler() {
		totalPriceRuleHandler.setNextHandler(buyerRemarkRuleHandler);
		buyerRemarkRuleHandler.setNextHandler(productRuleHandler);
		return totalPriceRuleHandler;
	}
	
}
